home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ListPartVers.h
-
- Contains: Version definitions used by ListPart.idl & .r files.
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Notes:
-
- There are three sets of version numbers you need to maintain.
- The CFM version numbers in the 'cfrg' resource, the SOM
- class version numbers in the IDL file, and the Finder file
- version number.
-
- Fortuantely, all three version schemes require a "major" and "minor"
- number to generate the release version. This makes things
- easier, but not simple. SOM classes only use those two pieces,
- while CFM and the Finder define "development stage" and
- "prerelease" version; the "prerelease" version can basically be
- ignored, but be forewarned that CFM will use them, if provided.
-
- In all cases, a version number can be defined as 3 digits seperated
- by 2 periods. The "major" version number has a range of 0-99, while
- the two minor version numbers have a range of 0-9. An example of
- a version number is '2.3.1'. All digits in the version number are
- represented in Binary-Coded-Decimal (BCD) format even though they
- appear in hexadecimal. The above example version number is 0x0231
- in hexadecimal (note that the 3 and the 1 are in the same byte).
-
- Below is a set of defines to generate the version numbers for
- all three instances. This file should be included in your .r and
- .idl file to keep your part versioning in sync.
-
- Each time you need to update the version of the part generated, you
- should find the appropriate constants and change them.
-
- ** WARNING **: Each linker that you run will require the same numbers you
- specify here. Be sure to update your project preferences, for
- integrated environments, and your makefile for MPW to ensure the version
- numbers are the same everywhere.
-
- For complete explanation of version numbers, read the:
- 1) Finder Interface Chapter, Inside Macintosh: Macintosh Toolbox Essentials.
- 2) Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
- 3) SOM Developer's Guide
-
- */
-
-
- #ifndef _LISTPARTVERS_
- #define _LISTPARTVERS_
-
-
-
- // • Stuff •
-
- // Development Stages
- #define dsUndefined 0x00
- #define dsPreAlpha 0x20
- #define dsAlpha 0x40
- #define dsBeta 0x60
- #define dsFinal 0x80
- #define dsReleased dsFinal
- #define dsGoldenMaster dsFinal
-
-
- // • Change Often •
-
- // Current Major Version (version = major.minor.fix)
- // Note:this number is not hex because the value is used
- // in the IDL file and hex is not legal.
- #define currentMajorVersion 1
-
- // Current Minor Version (version = major.minor.fix)
- // Note:this number is not hex because the value is used
- // in the IDL file and hex is not legal.
- #define currentMinorVersion 0
-
- // Current Fix Version (version = major.minor.fix)
- #define currentFixVersion 0x00
-
- // Development Stage
- #define developmentStage dsFinal
-
- // Pre-release Number
- #define preReleaseNumber 0x00
-
- // Short version string
- #define shortVersionStr "1.0"
-
-
-
- // • Change Seldom •
-
- // Old Compatibility Definition Major Version (for CFM only)
- #define oldCompDefnMajorVersion 0x00
-
- // Old Compatibility Definition Minor Version (for CFM only)
- #define oldCompDefnMinorVersion 0x00
-
- // Old Compatibility Definition Fix Version (for CFM only)
- #define oldCompDefnFixVersion 0x00
-
- // Pre-release Number
- #define oldCompDefnPreRelNumber 0x00
-
- // Development Stage
- #define oldCompDefnDevStage dsUndefined
-
-
-
- // • Generated Version Numbers •
- // (Don't Change!!)
-
- #define currentVersion (currentMajorVersion<<24)+(currentMinorVersion<<20)+(currentFixVersion<<16) \
- +(developmentStage<<8)+preReleaseNumber
- #define compatibleVersion (oldCompDefnMajorVersion<<24)+(oldCompDefnMinorVersion<<20) \
- +(oldCompDefnFixVersion<<16)+(oldCompDefnDevStage<<8)+oldCompDefnPreRelNumber
- #define finderMinorVersion (currentMinorVersion<<4)+(currentFixVersion<<0)
-
- #endif // _LISTPARTVERSION_
-